#! /usr/bin/env python

def main():
    """3 ways to handle exceptions in Python"""
    #try:
    #    print 1/0
    #except Exception, e:
    #    print e
    try:
        print 1/2
    except Exception, e:
        print e
    else:
        print 'sucess'
    #try:
    #    f = file('1.txt','w')
    #    f.write('Hello World!')
    #except Exception, e:
    #    print e
    #finally:
    #    f.close()

if __name__ == '__main__':
    main()
